$input: (
  'min-height': getCssVar(editor, default, line-height),
);

@include b('input') {
  width: 100%;
  height: 100%;
  font-size: getCssVar(form-item, font-size);
  font-weight: getCssVar(form-item, regular);
  @include set-component-css-var(input, $input);

  @include e(ai-chat) {
    position: absolute;
    right: 10px;
    bottom: 10px;
    width: 36px;
    height: 36px;
    padding: 8px;
    font-size: 18px;
    color: getCssVar(color, primary, text);
    cursor: pointer;
    background-color: getCssVar(color, primary);
    border-radius: 15px;

    &:hover {
      color: getCssVar(color, primary, hover, text);
      background-color: getCssVar(color, primary, hover);
    }
  }

  .el-input .el-input__inner {
    height: 100%;
  }

  .el-input .el-input__inner::placeholder {
    color: getCssVar(form-item, placeholder-color);
  }

  .el-textarea .el-textarea__inner {
    height: 100%;
  }

  .el-textarea .el-textarea__inner::placeholder {
    color: getCssVar(form-item, placeholder-color);
    @include overflow-wrap;
  }

  @include b(input-input) {
    height: 100%;

    .el-input__wrapper{
      width: 100%;

      // 避免自适应高度后，没配高度么有默认行高
      min-height: getCssVar(input, min-height);
    }
  }

  @include m(readonly) {
    height: auto;
    line-height: getCssVar(input,min-height);
    color: getCssVar(form-item, readonly-color);
  }

  // 单位后缀样式
  .el-input__suffix {
    .#{bem(input,unit)} {
      // font-size: getCssVar('form-item', 'font-size');
      font-style: normal;
    }
  }
}

// 表单下的时间选择器默认显示，悬浮上去显示编辑器
@include b(input-form-default-content){
  display: none;
}

@include b(form-item){

  @include b(input) {
    @include when(show-default){
      
      @include when(textarea){
        padding: getCssVar(form-item, hover-edit-padding);
        @include b(input-form-default-content){
          display: none;
        }     
        @include b(input-input){
          display: block;    
        }         
      }

      // 悬浮显示编辑器
      &:hover{
        @include b(input-form-default-content){
          display: none;
        }     
        @include b(input-input){
          display: block;    
        }       
      }    
      
      // 不悬浮时显示信息态
      @include b(input-form-default-content){      
        display: flex;
        align-items: center;
        width: 100%;
        padding: getCssVar(form-item, hover-edit-padding);        
        font-family: Arial, sans-serif;;      
        font-size: getCssVar(form-item, font-size);
        line-height: getCssVar(editor, default, line-height);
        color: getCssVar(form-item, text-color);      
      }
      @include b(input-input){
        display: none;  
      }
      
      // 输入态
      @include when(editable){
        @include b(input-form-default-content){
          display: none;
        }     
        @include b(input-input){
          display: block;    
        }  
      }
    }

  }
}